import request from '@/config/axios'

// 学生信息变更审批 VO
export interface UstcStudentInfoVerifyVO {
  id: number // 主键
  accountId: number // 申请账号ID
  studentCode: string // 冗余-学号
  studentName: string // 冗余-学生姓名
  studentGrade: string // 冗余-年级
  studentMajor: string // 冗余-专业
  studentCampus: string // 冗余-院系
  verifyType: string // 审核类型
  verifyStatus: string // 审核状态
  modifyFields: string // 修改字段
  oldValue: string // 旧值
  newValue: string // 新值
  remark: string // 备注
  reviewer: number // 审核人ID
  reviewerName: string // 审核人姓名
  reviewTime: Date // 审核时间
  reviewComments: string // 审核意见
}

// 学生信息变更审批 API
export const UstcStudentInfoVerifyApi = {
  // 查询学生信息变更审批分页
  getUstcStudentInfoVerifyPage: async (params: any) => {
    return await request.get({ url: `/core/ustc-student-info-verify/page`, params })
  },

  // 查询学生信息变更审批详情
  getUstcStudentInfoVerify: async (id: number) => {
    return await request.get({ url: `/core/ustc-student-info-verify/get?id=` + id })
  },

  // 新增学生信息变更审批
  createUstcStudentInfoVerify: async (data: UstcStudentInfoVerifyVO) => {
    return await request.post({ url: `/core/ustc-student-info-verify/create`, data })
  },

  // 修改学生信息变更审批
  updateUstcStudentInfoVerify: async (data: UstcStudentInfoVerifyVO) => {
    return await request.put({ url: `/core/ustc-student-info-verify/update`, data })
  },

  // 删除学生信息变更审批
  deleteUstcStudentInfoVerify: async (id: number) => {
    return await request.delete({ url: `/core/ustc-student-info-verify/delete?id=` + id })
  },

  // 导出学生信息变更审批 Excel
  exportUstcStudentInfoVerify: async (params) => {
    return await request.download({ url: `/core/ustc-student-info-verify/export-excel`, params })
  },

  // 管理员修改学生信息
  adminModifyUstcStudent: async (data: Partial<UstcStudentInfoVerifyVO>) => {
    return await request.put({ url: `/core/ustc-student-info-verify/admin-modify-student`, data })
  },

  // 修改学生信息变更审批
  adminVerifyUstcStudentInfo: async (data: Partial<UstcStudentInfoVerifyVO>) => {
    return await request.put({ url: `/core/ustc-student-info-verify/admin-verify`, data })
  }
}
